data=$1
klogx=$2

echo $data $klogx

#data
root -q -l -b 'drawFractionRatio.C("'$data'",0,"ETA0outgrsys_'$data'_id20.root","ETA1outgrsys_'$data'_id20.root","ETA2outgrsys_'$data'_id20.root","ETA3outgrsys_'$data'_id20.root",1,"ratio to average",3,'$klogx',0)'
root -q -l -b 'drawFractionRatio.C("'$data'",1,"ETA0outgrsys_'$data'_id20.root","ETA1outgrsys_'$data'_id20.root","ETA2outgrsys_'$data'_id20.root","ETA3outgrsys_'$data'_id20.root",1,"ratio to average",3,'$klogx',0)'
root -q -l -b 'drawFractionRatio.C("'$data'",2,"ETA0outgrsys_'$data'_id20.root","ETA1outgrsys_'$data'_id20.root","ETA2outgrsys_'$data'_id20.root","ETA3outgrsys_'$data'_id20.root",1,"ratio to average",3,'$klogx',0)'
root -q -l -b 'drawFractionRatio.C("'$data'",3,"ETA0outgrsys_'$data'_id20.root","ETA1outgrsys_'$data'_id20.root","ETA2outgrsys_'$data'_id20.root","ETA3outgrsys_'$data'_id20.root",1,"ratio to average",3,'$klogx',1)'

exit

#comp to phyTrue
root -q -l -b 'drawFractionRatio.C("'$data'-ETAALL-phyTrue", 0, "ETAALLfromPTmcfrac_'$data'_id20.root","Fraction_'$data'_proton.root",  "","",0,"",3,'$klogx')'
root -q -l -b 'drawFractionRatio.C("'$data'-ETAALL-phyTrue", 1, "ETAALLfromPTmcfrac_'$data'_id20.root","Fraction_'$data'_pion.root",    "","",0,"",3,'$klogx')'
root -q -l -b 'drawFractionRatio.C("'$data'-ETAALL-phyTrue", 2, "ETAALLfromPTmcfrac_'$data'_id20.root","Fraction_'$data'_kaon.root",    "","",0,"",3,'$klogx')'
root -q -l -b 'drawFractionRatio.C("'$data'-ETAALL-phyTrue", 3, "ETAALLfromPTmcfrac_'$data'_id20.root","Fraction_'$data'_electron.root","","",0,"",3,'$klogx', 1)'

#generate algo true
#algoTrue = phyTrue
#root -q -l -b 'drawFractionRatio.C("'$data'-algoTrue",0,"ETA0fromPTmcfrac_'$data'_id20.root","ETA1fromPTmcfrac_'$data'_id20.root","ETA2fromPTmcfrac_'$data'_id20.root","ETA3fromPTmcfrac_'$data'_id20.root",1,"ratio",3,'$klogx',0)'
#root -q -l -b 'drawFractionRatio.C("'$data'-algoTrue",1,"ETA0fromPTmcfrac_'$data'_id20.root","ETA1fromPTmcfrac_'$data'_id20.root","ETA2fromPTmcfrac_'$data'_id20.root","ETA3fromPTmcfrac_'$data'_id20.root",1,"ratio",3,'$klogx',0)'
#root -q -l -b 'drawFractionRatio.C("'$data'-algoTrue",2,"ETA0fromPTmcfrac_'$data'_id20.root","ETA1fromPTmcfrac_'$data'_id20.root","ETA2fromPTmcfrac_'$data'_id20.root","ETA3fromPTmcfrac_'$data'_id20.root",1,"ratio",3,'$klogx',0)'
#root -q -l -b 'drawFractionRatio.C("'$data'-algoTrue",3,"ETA0fromPTmcfrac_'$data'_id20.root","ETA1fromPTmcfrac_'$data'_id20.root","ETA2fromPTmcfrac_'$data'_id20.root","ETA3fromPTmcfrac_'$data'_id20.root",1,"ratio",3,'$klogx',1)'

#comp to algoTrue
#root -q -l -b 'drawFractionRatio.C("'$data'-ETAALL-algoTrue", 0, "Fraction_'$data'-algoTrue_proton.root",  "Fraction_'$data'_proton.root",  "","",0,"",3,'$klogx')'
#root -q -l -b 'drawFractionRatio.C("'$data'-ETAALL-algoTrue", 1, "Fraction_'$data'-algoTrue_pion.root",    "Fraction_'$data'_pion.root",    "","",0,"",3,'$klogx')'
#root -q -l -b 'drawFractionRatio.C("'$data'-ETAALL-algoTrue", 2, "Fraction_'$data'-algoTrue_kaon.root",    "Fraction_'$data'_kaon.root",    "","",0,"",3,'$klogx')'
#root -q -l -b 'drawFractionRatio.C("'$data'-ETAALL-algoTrue", 3, "Fraction_'$data'-algoTrue_electron.root","Fraction_'$data'_electron.root","","",0,"",3,'$klogx', 1)'
